package gameManager;

import java.awt.Image;
import java.awt.Point;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ImageIcon;

/**
 * A concrete Level class to generate the enemies.
 * @author Bruce
 *
 */
public class LevelOne extends Level{
    
    private int numberOfEnemy;
    private List<NonPlayerCharacter> levelOneEnemies = new ArrayList<NonPlayerCharacter> ();
    
    public LevelOne() {
        numberOfEnemy = 3;
    }

    /**
     * Generate enemies according to the time
     */
    @Override
    public List<NonPlayerCharacter> createNonPlayerCharacter (int trigger) {
        levelOneEnemies.clear();
        
        if (trigger % 100 == 0) {
            for (int i = 0; i < numberOfEnemy; i++) {
                Point startPosition = new Point(750, 20 + 190 * i);
                EnemyMoving levelOneEnemy = new EnemyMoving(startPosition,180);
                levelOneEnemies.add(levelOneEnemy);
            }
            
            return levelOneEnemies;
        }
        return null; 
    }

    @Override
    public Image getBackgroundImage () {
        ImageIcon objectIcon = new ImageIcon("background.jpg");
        return objectIcon.getImage();
    }

    @Override
    public void loadMusic () {
        // TODO Auto-generated method stub
        
    }

}
